package com.itheima.service.impl;

import com.itheima.dao.UserDao;
import com.itheima.domain.User;
import com.itheima.service.UserService;
import jdk.nashorn.internal.objects.annotations.Setter;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserServiceImpl implements UserService {

    @Autowired
    private UserDao userDao;

    //public UserServiceImpl(@Autowired UserDao userDao) {
    //    this.userDao = userDao;
    //}

    public void saveUser(User user) {
        userDao.insertUser(user);

    }

    public User findByUsername(String username) {
        return userDao.findByUsername(username);

    }

    public List<User> findAll() {
        return null;
    }


}
